Fix the wrong bash if syntax for checking the existence of perl tool.
For Travis CI - switch CI build to use OS X build environment.