64 bit support

Fixes #562