Fixed compiler warning.
configure script:
- added support for different shared library suffixes
- better handling of darwin/OSX particularities