Merge pull request #21 from fperrad/compat51_52