Removed libm dependency.
Removed X11 lib linking.