(#1622) - test in phantomjs

Also add the ability to specify whether or
not to use the ES5 shims, since phantomjs
needs them.