Add 64bit support

This PR adds 64bit defines where needed.