added support for comiling on mac, cmake 2.8.11, cuda 5.0