Updated to work on x86_64 systems.