Misc GCC/Clang/Unix related fixes

Makes ObjectScript again buildable in GNU/Linux and the BSDs. Main issue was the template specializations, which had to be moved to namespace scope: as per the C++ standard, that is the correct way, and the more strict compilers (GCC, Clang) were reporting those as an error.

I do not have a Microsoft system at hand to check if MSVC will be happy with making the template specializations at the namespace level (it should), so please double check that before merging.