Fix compilation errors

- strdup is not part of the c99 standard
- math library not linked