MSVC: handle symbol visibility

On MSVC, the exported symbols have to be marked both in the header and
in the implementation as dllexport, whereas on GCC the visibility=normal
attribute is only supposed to be used in the implementation. As a
result, we need two types of macros here, one for the public headers,
and the other for TUs with implementation. Also, the symbol name cannot
be generic ("API") because we only want to mark as dllexport those
symbols which are in a library that we're building *now*. Otherwise this
will break havoc in any libraries which also use the `ABI` macro *and*
also use libyang.
diff --git a/src/dict.h b/src/dict.h
index 7874813..cf897e7 100644
--- a/src/dict.h
+++ b/src/dict.h
@@ -78,7 +78,7 @@
  * @return LY_EINVAL in case of invalid input parameters.
  * @return LY_EMEM in case of memory allocation failure.
  */
-LY_ERR lydict_insert(const struct ly_ctx *ctx, const char *value, size_t len, const char **str_p);
+LIBYANG_API_DECL LY_ERR lydict_insert(const struct ly_ctx *ctx, const char *value, size_t len, const char **str_p);
 
 /**
  * @brief Insert string into dictionary - zerocopy version. If the string is
@@ -97,7 +97,7 @@
  * @return LY_EINVAL in case of invalid input parameters.
  * @return LY_EMEM in case of memory allocation failure.
  */
-LY_ERR lydict_insert_zc(const struct ly_ctx *ctx, char *value, const char **str_p);
+LIBYANG_API_DECL LY_ERR lydict_insert_zc(const struct ly_ctx *ctx, char *value, const char **str_p);
 
 /**
  * @brief Remove specified string from the dictionary. It decrement reference
@@ -111,7 +111,7 @@
  * @return LY_ENOTFOUND if the value was not found.
  * @return LY_ERR on other errors.
  */
-LY_ERR lydict_remove(const struct ly_ctx *ctx, const char *value);
+LIBYANG_API_DECL LY_ERR lydict_remove(const struct ly_ctx *ctx, const char *value);
 
 /** @} dict */