libyang CHANGE split type base and type flags

Fixes #468
diff --git a/src/printer_json.c b/src/printer_json.c
index fe572dc..4b13918 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -85,7 +85,7 @@
             ly_print(out, "%*s\"%s\":", LEVEL, INDENT, attr->name);
         }
         /* leafref is not supported */
-        switch (attr->value_type & LY_DATA_TYPE_MASK) {
+        switch (attr->value_type) {
         case LY_TYPE_BINARY:
         case LY_TYPE_STRING:
         case LY_TYPE_BITS:
@@ -163,7 +163,7 @@
         }
     }
 
-    datatype = leaf->value_type & LY_DATA_TYPE_MASK;
+    datatype = leaf->value_type;
 contentprint:
     switch (datatype) {
     case LY_TYPE_BINARY:
@@ -215,7 +215,7 @@
             }
             datatype = type->base;
         } else {
-            datatype = iter->value_type & LY_DATA_TYPE_MASK;
+            datatype = iter->value_type;
         }
         goto contentprint;