Add missing linker option.

Also make spec file to be more Jenkins-compatible.