Changes to build system intended to detect if linking with librt is necessary.