backported header fix from 0.8. Fixes #84