fixed #38 for real, now compiling both shared and static libraries