Changed API and EXT symbols to XAVI_API and XAVI_EXTERN to avoid potential collision with symbols defined by a program.
Fixed a bug that caused build failure with GCC.