Macheda nets four-year deal with United