Adding SystemConfiguration framework
updated MenuItemType and added NSMenuDelegate support
set the delegate for NSMenu
Added extra checks for network connectivity