--- a/src/script_engine.h
+++ b/src/script_engine.h
@@ -33,6 +33,11 @@
 #endif
 #include <jsapi.h>
 #include <pthread.h>
+
+// nice stable mozjs API
+#ifndef HAVE_JSFLOAT64
+typedef jsdouble JSFloat64;
+#endif
 
 #ifndef JSFUN_FAST_NATIVE
 // All natives are JSFastNative