Fix uninitialized variable in directives.c

Also adds some things for emscripten