ensure g++ is upgraded for shared build