Fix build flags in test.py
Merge branch 'master' into travis-ci.macosx.branch