Added an option for static linking