Fixing issues due to refactoring carbon-kernel

Please merge after wso2/carbon4-kernel#51 is merged