Fix some issues from cgcc build

- make some not defined symbols static
- fix check for pointer value