C++ core code updates

Modifications to LGL to allow for building on modern operating systems.