Use a NEWRES macro for creating resources

Rather than using newres directly, define a macro so that NEWOBJ can be used
on versions where it still exists and newres doesn't.