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/parser_lyb.c b/src/parser_lyb.c
index 596e48c..3352ed9 100644
--- a/src/parser_lyb.c
+++ b/src/parser_lyb.c
@@ -1647,7 +1647,7 @@
     return _lyd_parse_lyb(ctx, ext, parent, first_p, in, parse_opts, val_opts, int_opts, parsed, lydctx_p);
 }
 
-API int
+LIBYANG_API_DEF int
 lyd_lyb_data_length(const char *data)
 {
     LY_ERR ret = LY_SUCCESS;