Tweaked to allow compile with -m64