Remove unnecessary &x[0] in various locations

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Add extern C definitions to header file for use with C++

Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>