Added compatibility with version 0.9

Patch originally proposed by Sebastien Blaisot.