add a new header system.h with some compatibility glue for non C99-compliant systems

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>