Fixed some issues when compiling on Linux

* Now compiling with --std=C99 by default
* Changed POSIX Standard to X/Open 7 and POSIX 2008 Standard
* Added explicit linking to -ldl