Fix issues with python-magic pip library