Series of OS X-related compilation fixes.

When compiling with clang and libc++ under OS X, neither the tr1 namespace or its related directories exist.  This is fairly specific to libc++.  Clang on the other hand complains about the IVec3Cmp functor, failing somewhere in the map template.  Marking the () operator as const resolves this.