Fix compilation for 4.02
Fix support for 4.00