def load_libzbar():
    """Loads the zbar shared library and its dependencies.

    Populates the globals LIBZBAR and EXTERNAL_DEPENDENCIES.
    """
    global LIBZBAR
    global EXTERNAL_DEPENDENCIES
    if not LIBZBAR:
        libzbar, dependencies = zbar_library.load()
        LIBZBAR = libzbar
        EXTERNAL_DEPENDENCIES = [LIBZBAR] + dependencies

    return LIBZBAR