Fixes compile problems for GCC 4.7

Replaces uses of std::map::emplace because that's not supported in GCC 4.7 and we'll probably want to support that version. Also disables Wextra in JSAPI headers to silence some warnings in from headers. I started removing some checks for GCC < 4.6 in the header I had to edit, but that is not directly related to the SpiderMonkey upgrade and will require more work (has to be backported to SVN).