Add integration test to be run in PhantomJS. Fixes #36.