For cases where we pass a buffer and buffer_size to open_read and have
fmemopen, is_seekable was returning false. The effect of this is that reading files and using format auto-detection fails when reading.
With this patch applied the implementation checks whether seeking actually works when files are not
regular files.
Improved version that also handles fstat failing, the current code would read uninitialized memory.
I have applied a simper version with just the fseek() test.