Support build on Mac OS

This change adds the -XstartOnFirstThread JVM flag when running the
build on Mac OS so the tests don't fail.