Use API URL for composer.json only if oAuth token provided

The Github API is limited, especially if no (valid) oAuth token is provided. This patch uses the raw URL for fetching the composer.json file and falls back to the API URL if a token is provided (required for private repos).