Improve spec and return einval when unsupported to conform to old library