If you set a specific "target hardware device" then rtwtypes.h won't include tmwtypes.h. In other words add something like the following on line 19 of your "generate_internal_designer.m" script:
cfg.HardwareImplementation.TargetHWDeviceType = 'Intel->x86-64 (Windows64)';
If you want to use a different device type you can get the string for it by doing the following:
>> cfg = coder.config('dll');
>> open cfg
Then click the "Hardware" button along the top of the "Project Settings" window, set Hardware Board to "None - Select device below", and set the device as desired.
And MATLAB will display the string you want.
Also, why do you think tmwtypes.h is under a specific license? Looking at the file I see there's a copyright but nothing indicating a specific license. It should be fine to package tmwtypes.h with your code.