Fix some problems with typecast handling.

- If the given type had no modifiers specified, the base type string
  wasn't being moved out of the input buffer, leading to it mistakenly
  being parsed as a modifier. This would result in errors for simple
  cases such as a cast to size_t. Thanks Axel for reporting.