Looking at the libwebp source, it seems the online documentation has the 'flags' bits in the VP8X chunk around the wrong way.
Move read_le32() into the header file.
Step through all chunks in the file and pull out the ICC profile before decoding.