Use global variable for API-endpoint/version. Fixes #227.