Properly use default parameter for cookies.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | ---
| Refs tickets  | ---
| License       | MIT
| Doc PR        | ---

I know `ServiceUtil::get()` is *evil*, but as `CookieUtil` is placed in a `legacy` folder I came up with that solution.

Without this patch, `CookieUtil` fails if a default value is specified and the cookie does not exist.

/cc @craigh