Added support for G2M5 codec

This has also been independently found and fixed similarly by carl in
f4a3bbf4a3cd375121ea2495817f3e50e831ed48
The 2nd magic check is taken from carls implementation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
