Add option to switch shared and sttaic version of the library.