Build shared by default

Enable building shared by default but still build the static library as well. We also teach travis to build the example project against both libraries.