Fix JavaScript tests on Travis