An Australian man who punched and stomped on a pregnant Muslim woman has been sentenced to three years in prison.