Fixed mimetype detection not working on some distros

Thanks, @muges