OS X 10.8 compatibility tweaks

So I put all those little changes together to make Sim compile well on OS X. I also wrote a manual on [how to install it from scratch](https://docs.google.com/document/d/18_r9FMkcgAUOjAuA5FlkqK92e064M0vD8S3KZabErzU/edit?usp=sharing). 
One more thing, in Makefile.local, there's a "-lrt" option in SYSTEM_LDFLAGS. This library is not available on Mac and by having changed the code in time.hpp, this is not even needed there for Macs. Is it possible to conditionally remove it for OS X?