Merged changes by goingnuts.
Fixed building under Lazuyx, for x86_64.