Fixes for recent issues

Thanks for adding support for all LM types.
I added a check for whether or not to use librt in setup.py.