utils: create cross-platform gzopen function
Merge branch 'gzopen'