[build] further RTAI build fixes

This time for the tests and kernel builds

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>