Fix build on 64 bit Windows.
Overhaul command line options. Fixes #155.