Improve compatibility with OpenBSD.

Fix double_cmp to return long instead of double.