makefile changes, XOPEN_SOURCE compiler flag was needed