Fix building with boost 1.40.
Merge branch 'v0.11'