Relaxed header parsing, fix for FreeImage problem