Added support for building with GNU C (Linux, etc.).  Fixed minor bugs in diff routine.