Compilation and build fixes. Now embedlite compiles on GCC4.8.3!

I have tried building with the startup cache on but it failed (it fails at the end of the build with xpcshell says libjpeg.so.62 is missing, but it actually isn't, so probably an env vars issue).

Let me know if you want me to address other points