Fix 0.6 compatibility
Merge pull request #52 from rvagg/compat

Fix 0.6 compatibility