test.c: add the some stdlib headers explicitly

These used to come from cfg2.h, which was not prefered.
Add them explicitly in the test code.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>