shared: Add missing header for page_size
Use private shared lib with modules

As the modules make use of parts of the private shared library, link
those modules with the shared library.