Workaround the Travis CI extra space issue

Expanded the test condition to include both the browser case (no extra
space) and the Travis CI/Phantomjs case (extra space)