fixed osx compilation

-lrt does not exists on Mac OS X.

I wasn't sure how to test the platform but since this script is executed by a "full" ruby interpreter I figured RUBY_PLATFORM was a pretty straight forward solution.

( ENV['OS'] is undefined for me )