Update compat.c

Uses typedef unsigned long.