Fixes to build with gcc4.6 on Ubuntu 12.04

* Added librt to the linker line.
* Changed -std=c++11 to -std=c++0x to satisfy gcc versions older than 4.7
* Added a .gitignore file to keep things tidy