Updated extensions and build tasks based on Heroku testing.
Better platform detection in Rake compile and build tasks.