Fixes for compile issues pre-1.7 (diamond operator) and fixes for compile issue in cdi module