Fixed build system for shared library. Now builds with and without {CUDA, OpenCL} work well.