Fix mis-use of lower_bound
Add examples + make the project complient with dynamic library generation