Move existing code to a shared library and invoke it on the build process to parse environment variables on configuration files. Looking for a consistent behavior. close #1590