Fix Python 3.8 compatibility
From Python 3.8 and onwards, C extensions are no longer linked to libpython so in order to embed python within an application the --embed flag needs to be added to python3-config --libs. A fall back is provided as the command will error out on previous python versions.
References: https://bugs.python.org/issue36721