updated for Mountain Lion and ruby 2.0.0p247