Now matches latest

Source adapted from https://gist.github.com/agnoster/3712874. Now works on OSX 10.7 for me.