Export PATH and ERRNO_CODES from Emscripten. ### Description

Fixes #2577 by exporting `PATH` and `ERRNO_CODES` from Emscripten

### Checklists

- [x] Add a [CHANGELOG](https://github.com/pyodide/pyodide/blob/main/docs/project/changelog.md) entry
- [x] Add / update tests
- [x] Add new / update outdated documentation

# JavaScript API

Backward compatibility of the API is not guaranteed at this point.

## Globals

```{eval-rst}
.. js-doc-summary:: globalThis
.. js-doc-content:: globalThis
```

(js-api-pyodide)=

## pyodide

```{eval-rst}
.. js-doc-summary:: pyodide
.. js-doc-content:: pyodide
```

(js-api-pyproxy)=

## PyProxy

A PyProxy is an object that allows idiomatic use of a Python object from JavaScript. See {ref}`type-translations-pyproxy`.

```{eval-rst}
.. js-doc-summary:: PyProxy
.. js-doc-content:: PyProxy
```

# JavaScript API

Backward compatibility of the API is not guaranteed at this point.

## Globals

```{eval-rst}
.. js-doc-summary:: globalThis
.. js-doc-content:: globalThis
```

(js-api-pyodide)=

## pyodide

```{eval-rst}
.. js-doc-summary:: pyodide
.. js-doc-content:: pyodide
```

(js-api-pyproxy)=

## PyProxy

A PyProxy is an object that allows idiomatic use of a Python object from JavaScript. See {ref}`type-translations-pyproxy`.

```{eval-rst}
.. js-doc-summary:: PyProxy
.. js-doc-content:: PyProxy
```
